<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<!DOCTYPE html><html>
	<head>
		<title>上传照片</title>
        <%@ include file="/common/meta.jsp"%>
		<script type="text/javascript" src="${res}/js/jquery/jquery.form.js"></script>
		<script type="text/javascript" src="${res}/js/plugins/scmtip/scmtip.js"></script>
        <script type="text/javascript" src="${res}/js/proposal/irisPrpPrepare.js"></script>
        <script type="text/javascript" src="${res}/js/validate/irisvalidator.js"></script>
        <script type="text/javascript" src="${res}/js/keyword/keywordtips.js"></script>
        <script type="text/javascript" src="${res_app}/js/app/proposal/irisPrpPrepare.js"></script>	
        <script type="text/javascript">
            var prcWin = new progressWin("${res}");//初始化遮罩层


            $(function() {
	
	            fileInit("orgInfo","JPG,BMP,GIF",null,"{'jpg':'2048'，'bmp':'2048','gif':'2048'}");
	            $("#orgInfo").find(".file").hide();//隐藏文本框
	            $("table.t_css").each(function(){
		           $(this).find("tr:even").addClass("li_1");
		           $(this).find("tr:odd").addClass("li_2");
	            });
            });
            
            function Save(flag){
            	if($("#re_content_file_code8").val()!=""){
            		if(flag=="org"){
            		    parent.$("#content_file_code8").val($("#re_content_file_code8").val());
                	    parent.$("#orgphotoImg").attr("src",ctx+'/file/ajax-filedownload?fileCode='+$("#re_content_file_code8").val());
            		}
            		if(flag=="stu"){
            			parent.$("#content_file_code9").val($("#re_content_file_code8").val());
                	    parent.$("#stuphotoImg").attr("src",ctx+'/file/ajax-filedownload?fileCode='+$("#re_content_file_code8").val());
                	    parent.$("#recphotoImg").attr("src",ctx+'/file/ajax-filedownload?fileCode='+$("#re_content_file_code8").val());
            		}
            	scmSuccess("操作成功！", null, 3000);
				window.setTimeout("parent.tb_remove();", 500);
            }else{
        		scmError("请上传图片！", null, 3000);
        		return false;
        	}
            }
        </script>
	</head>
	<body>
        <table class="t_css" style="" width="100%" border="0" cellpadding="0" cellspacing="1" id="orgInfo">
           <tr>
           <td  height=70.5% width=70.5% align="center">
		        <div id="uploadsuccess8">
		        <c:set var="file_code8"></c:set>
		        <c:choose>
		           <c:when test="${empty param.fileCode || param.fileCode==''}">
		              <img src="${res_app}/images/app/photo_01.jpg"  style="width:130px;height:159px" />
		           </c:when>
		           <c:otherwise>
		              <img src="${ctx}/file/ajax-filedownload?fileCode=${param.fileCode}"  style="width:130px;height:159px" />
		           </c:otherwise>
		        </c:choose>
		        </div>
		    </td>
		    <td>
		        <div id="file8" style="text-align:center">
		            <input type="file" name="filedata" style="text-align:center"/>
		            <input type="hidden" name="content/file_code8" id="re_content_file_code8"  value="" />
		        </div>
		    </td>
           </tr>
        </table>
        <br>
        <table width="100%" border="0" cellpadding="0" cellspacing="1">
           <tr>
              <td align="center">
                <input type="button" name="btnSave" id="btnSave" class="button_01" value="确定" onclick="Save('${param.flag}')"/>
                <input type="button" name="btnBack" id="btnBack" class="button_01" value="取消" onclick="parent.tb_remove();" />
              </td>
           </tr>
      </table>

     
	</body>
	<script type="text/javascript">
    </script>
</html>